package com.pk5.ofenclass;

import com.sun.jmx.remote.internal.ArrayQueue;

import java.util.*;

enum WeekDay {
    MONDAY,
    TUESDAY,
    WEDNESDAY,
    THURSDAY,
    FRIDAY,
    STATUSDAY,
    SUNDAY
}

public class Main {
    public static void main(String[] args) {
        Set<Integer> intSet = new HashSet<>();
        System.out.println("HashSet-无序集合");
        intSet.add(1);
        intSet.add(2);
        intSet.add(3);
        intSet.add(13);
        intSet.add(33);
        for (Integer i : intSet) {
            System.out.println(i);
        }
        System.out.println(intSet.contains(33));

        System.out.println("TreeSet-有序集合");
        intSet = new TreeSet<>();
        intSet.add(1);
        intSet.add(2);
        intSet.add(3);
        intSet.add(13);
        intSet.add(33);
        for (Integer i : intSet) {
            System.out.println(i);
        }
        System.out.println(intSet.contains(33));

//        Set<WeekDay> weekdaySet=new EnumSet<WeekDay>();

    }
}
